home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 120
/
Vol 120.iso
/
games
/
titans
/
game.swf
/
scripts
/
frame_4
/
DoAction.as
Wrap
Text File
|
2010-11-09
|
1KB
|
55 lines
Movieclip.prototype.fadescreen = function(speed)
{
if(!speed)
{
var speed = 5;
}
_root.createemptymovieclip("dark",1000001);
var d = _root.dark;
with(d)
{
lineStyle(1,0,100);
beginfill(0,100);
moveto(-5000,-5000);
lineto(5000,-5000);
lineto(5000,5000);
lineto(-5000,5000);
endfill();
d.onEnterFrame = function()
{
_alpha -= speed;
if(_alpha <= 0)
{
removeMovieClip("");
stop();
}
};
}
};
movieclip.prototype.makecrash_instruction = function(tipe1, tipe2, total)
{
var i = 0;
while(i < total)
{
this.attachmovie("crashing","rub" + this.rd,this.rd);
var ska = 60 + random(40);
var rbb = this["rub" + this.rd];
rbb._xscale = ska;
rbb._yscale = ska;
rbb._x = -40 + random(80);
rbb._y = -40 + random(80);
rbb.vx = 0.2 * this.vx;
rbb.vy = 0.2 * this.vy;
if(random(100) > 50)
{
rbb.tipe = tipe1;
}
else
{
rbb.tipe = tipe2;
}
this.rd = this.rd + 1;
i++;
}
};